$(document).ready(function(e) {
	var num = 0;
	/*$("#username").val() = $.cookie('username'); 
	$("#password").val() = $.cookie('password'); */
	$("#username,#password").hover(//输入框样式
		function() {$(this).css("background","#CCC");},
		function() {$(this).css("background","#FFF");}
	);
	window.setInterval(function(){//切换背景
		if(num==1){
			$("body").css("background","url(../images/me_03.jpg)");
			$("body").css("background-size","cover");
			$("body").css("background-repeat","no-repeat");
			$("body").css("background-attachment","fixed");
			num=0;
		}else if(num==0){
			$("body").css("background","url(../images/me_04.jpg)");
			$("body").css("background-size","cover");
			$("body").css("background-repeat","no-repeat");
			$("body").css("background-attachment","fixed");
			num=1;
		}
	},5000);
	$("#loginform").submit(function(){
		if($("#username").val()==''){ //判断手机输入是否为空
			alert("用户名不能为空");
			$("#username").focus();
			return false;
		}
		if($("#password").val()==''){ //判断密码输入是否为空
			alert("密码不能为空");
			$("#password").focus();
			return false;
		}
		/*if($("#cookietime").val()!=null){
            $.cookie('username',$("#username").val(),{expires:7,path:'./login.html'});
			$.cookie('password',$("#password").val(),{expires:7,path:'./login.html'});
		}*/
		return true;
	}
	);
});